package logger

type IFormatter interface {
	Begin(ctx *Context)
	End(ctx *Context)

	AppendTimeBytes(ctx *Context, bs []byte)
	AppendLevel(ctx *Context, lv Level)

	PrefixBegin(ctx *Context)
	AppendPrefix(ctx *Context, index int, pre string)
	PrefixEnd(ctx *Context)

	FieldBegin(ctx *Context)
	AppendFieldInt64(ctx *Context, index int, k string, v int64)
	AppendFieldUint64(ctx *Context, index int, k string, v uint64)
	AppendFieldFloat64(ctx *Context, index int, k string, v float64)
	AppendFieldString(ctx *Context, index int, k string, v string)
	FieldEnd(ctx *Context)

	AppendMessage(ctx *Context, msg string)
	AppendError(ctx *Context, err error)

	AppendCodeLine(ctx *Context, file string, line int)
}
